
module.exports = {
  'number range test': (browser) => {
    browser
      .url('http://localhost:3000')
      .waitForElementVisible('#app', 5000)

      // click menu NumberRangeDemo
      .click("xpath", "//a[contains(text(), 'NumberRangeDemo')]")
      .waitForElementVisible('.number-range-demo', 5000)

      .updateValue('input.number-range-input', 9) // input incorrect number 9 out of range [10, 20]
      .moveToElement('.el-form-item__label', 0, 0).mouseButtonClick() // click outsize input box
      .waitForElementPresent('.el-message--error', 5000) // check error message
      .click('.el-message__closeBtn')

      .updateValue('input.number-range-input', 11) // input correct number 11 in range [10, 20]
      .moveToElement('.el-form-item__label', 0, 0).mouseButtonClick() // click outsize input box
      .pause(1000)
      .assert.elementNotPresent('.el-message--error') // check error message

      .end()
  },
}
